package basics;
import pixi.core.sprites.Sprite;
import pixi.plugins.spine.Spine;
import framework.widgets.SpriteButton;
import pixi.core.textures.Texture;

class StartState extends GameState{

	private var _btnStart:SpriteButton;

    public function new() {
		super(0);
    }


	override public function onEnter():Void {

		var background = new Sprite(Texture.fromImage("assets/textures/bkg/start.jpg"));
		background.anchor.set(0.5);
		this.addChild(background);

		_btnStart = new SpriteButton(Texture.from("assets/textures/start/start.png"));
		_btnStart.onClick = this.onClick;
		_btnStart.position.set(0, 320);
		this.addChild(_btnStart);
	}

	override public function onExit():Void {
	}


	private function onClick(){
		SceneManager.instance.changeState(new PlayState());
	}

}
